<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('wxreceivetype/set_receive')}">设置接收</a></li>
    </ul>
    <form method="post" class="form-horizontal  margin-top-20" action="{:url('wxreceivetype/set_receive')}">

 <!--        <div class="form-group">
            <label for="input-type" class="col-sm-2 control-label">设置接收场地类型</label>
            <div class="col-md-6 col-sm-10">
                <select class="form-control" name="receive_site_" id="input-type">
                   <option value=" " >请选择接收类型</option>
                    <foreach name="site_types" item="vo">
                    
                        <option value="{$vo.id}" >{$vo.name}</option>
                    </foreach>
                </select>
            </div>
            
        </div> -->
        <div class="form-group">
                <label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>场地类型</label>
                <div class="col-md-6 col-sm-10 site_types">
                    <foreach name="site_types" item="vo">
                        <label class="checkbox-inline">
                            <input value="{$vo.id}" type="checkbox" class="types" name="site_types[]">{$vo.name}
                        </label>
                    </foreach>
                </div>
            </div>
        <div class="form-group">
            <label for="input-user_email" class="col-sm-2 control-label"><span class="form-required">*</span>员工</label>
                <div class="col-md-6 col-sm-10">
                 
                        <label class="checkbox-inline">
                            <input value="2" type="checkbox" name="receive_user"  <if condition="$receive_user eq 2">checked="true"</if> >员工
                        </label>
                 
                </div>
            </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit" data-refresh="0">{:lang('SAVE')}</button>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
    <script type="text/javascript">
        $(function() {
            var site_types=<?php echo json_encode($receive_site); ?>;
            $.each(site_types,function(i,j){
                // $("input[value="+j+"]").attr("checked",true);
                $(".types").each(function(i){
                    // alert($(this).val());
                    var val = $(this).val();
                    if(val == j){
                        $(this).attr("checked",true);
                    }
                })
            })
          
        });
    </script>
</body>
</html>